import request from '../utils/request';

/**
 * 查询会员列表
 * @param query
 * @returns {AxiosPromise}
 */
export const selectPage = query => {
    return request({
        url: 'rest/staff1/selectPage',
        method: 'POST',
        data: query
    });
};

/**
 * 查询所有It员工
 * @param query
 * @returns {AxiosPromise}
 */
export const selectAllIt = query => {
    return request({
        url: 'rest/staff1/selectAllIt',
        method: 'POST',
        data: query
    });
};

/**
 * 新增会员
 * @param query
 * @returns {AxiosPromise}
 */
export const addStaff1 = query => {
    return request({
        url: 'rest/staff1/insertStaff1',
        method: 'POST',
        data: query
    });
};

/**
 * 编辑会员
 * @param query
 * @returns {AxiosPromise}
 */
export const updateStaff1 = query => {
    return request({
        url: 'rest/staff1/updateStaff1',
        method: 'POST',
        data: query
    });
};

/**
 * 删除会员
 * @param query
 * @returns {AxiosPromise}
 */
export const delStaff1 = query => {
    return request({
        url: 'rest/staff1/delete',
        method: 'POST',
        data: query
    });
};

/**
 * 查询会员
 * @param query
 * @returns {AxiosPromise}
 */
export const getStaff1ByID = query => {
    return request({
        url: 'rest/staff1/getById/' + query,
        method: 'POST',
    });
};